#include <bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define in read()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

int read() {
	int x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

const int N = 1e5 + 10;
const db eps = 1e-6;

struct node {
	db x, y;
	friend node operator - (node a, node b) { return (node){ a.x - b.x, a.y - b.y }; }
	friend db operator ^ (node a, node b) { return a.x * b.y - a.y * b.x; }
} t[N], stk[N];

db dis(node a, node b) { return sqrt(pow(a.x - b.x, 2) + pow(a.y - b.y, 2)); }

db equ(db x, db y) { return fabs(x - y) < eps; }

int top, n;
db ans;

void solve(int fl) {
	top = 0; rep(i, 1, n) {
		while(top > 1 && (fl ^ (((stk[top] - stk[top - 1]) ^ (t[i] - stk[top - 1])) <= 0))) top--;
		stk[++top] = t[i];
	} rep(i, 2, top) ans += dis(stk[i], stk[i - 1]);
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in; rep(i, 1, n) scanf("%lf %lf", &t[i].x, &t[i].y);
	sort(t + 1, t + n + 1, [](auto a, auto b) { return equ(a.x, b.x) ? a.y < b.y : a.x < b.x; });
	solve(0); solve(1); printf("%.2lf\n", ans);
	return 0;
}
